import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import "./network";
import toast from "./components/common/toast";
import fastClick from "fastclick";
import VueLazyload from "vue-lazyload";

Vue.config.productionTip = false;

// 创建事件总线，用于非兄弟组件之间的通信
Vue.prototype.$bus = new Vue();

// 安装toast插件，默认执行插件的install函数
Vue.use(toast);

// 解决移动端300ms延迟
fastClick.attach(document.body);

// 图片懒加载
Vue.use(VueLazyload, {
  // loading: require("./assets/img/common/placeholder.png")
});

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount("#app");
